import React, { useState, useEffect } from 'react'
import { Button } from 'antd'

export default function GetInfo(props) {
  const [excelInfo, setExcelInfo] = useState({})

  useEffect(() => {
     console.log(props.excelInfo,'props.excelInfo')
     setExcelInfo(props.excelInfo)
  },[props])

  const getInfo = () => {
    console.log(excelInfo,'点击后 的 excelInfo')
  }

  return (
    <div>
       <Button type='primary' style={{marginLeft:'10px'}} onClick={() => getInfo()}>获取信息</Button>
    </div>
  )
}
